<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>详情</title>
    <script src="https://cdn.bootcdn.net/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
    <script src="../untils/flexible.js"></script>
    <link rel="stylesheet" href="../css/detail.css">
    <link rel="stylesheet" href="../css/base.css">
    <script src="../untils/queryString.js"></script>
</head>
<body>
    <div class="header">
        <p id="ret"><</p>
        <h3 id="tit">省钱控-最新优惠</h3>
        <img class="app" src="../assets/images/header_app.png" alt="">
    </div>
    <div class="content">
    </div>
    <div class="buy">
        <a href="#">前往购买</a>
    </div>
    <div class="codeTwo">
        <img src="../assets/images/mmbweixin2.png" alt="">
    </div>
    <div class="dis">
    </div>
    <div class="foot">
        <div class="more">
            <a href="#">更多优惠信息>></a>
        </div>
        <div class="brand">
            <p>品牌排行</p>
        </div>
        <ul>
            <li>登入</li>
            <li>注册</li>
            <li class="goTop">返回顶部</li>
        </ul>
        <p id="p1"><span class="span1">手机APP下载 </span> 慢慢买手机版 <span class="span2">--掌上比价平台</span></p>
        <p id="p2">m.manmanbuy.com</p>
    </div>
</body>
<script>
    let href = location.href;
    let qr = getUrlParams(href);
    let {productid} = qr;
    let detHtml="";

    let disHtml="";
    $.ajax({
        url:"http://chst.vip:1234/api/getmoneyctrlproduct",
        data:{
            productid
        }
    }) .then(res=>{
        // console.log(res);
        let {result:[info]}=res;
        console.log(info.productComment);
            detHtml+=
            `
            <h2>${info.productName}</h2>
            <span class="outs">${info.productFrom}|${info.productTime}<span>${info.productTips}</span></span>
            ${info.productImgLg}
            <p>${info.productInfo}${info.productInfo1}</p>
            
            <div class="state">
                ${info.productImgLg}       
            </div>
            <div class="adress">
            ${info.productCity}
            </div>
            `
            disHtml+=
            `
            ${info.productComment}
            `
        $(".content").html(detHtml);
        $(".dis").html(disHtml);
    })
</script>
<script>
    $(window).scroll(function(){
        let scrollTop=$(window).scrollTop();
    })
    $(".goTop").on("click",function(){
        $("html").animate({
            scrollTop:0
        },100)
    })
</script>
<script>
    $("#ret").click(function(){
        window.history.back();
    })
</script>
</html>